package com.zz.tijian.handle.mq;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class OrderPayProducer {

    @Autowired
    private RabbitTemplate rabbitTemplate;


    public void sendOrderPayMessage(Integer orderId) {
        rabbitTemplate.convertAndSend(RabbitMQConfig.ORDER_PAY_EXCHANGE, RabbitMQConfig.ORDER_PAY_ROUTING_KEY, orderId);
    }
}
